package com.xmtlxx.wms.mapper;

import com.xmtlxx.common.annotation.DataColumn;
import com.xmtlxx.common.annotation.DataPermission;
import com.xmtlxx.common.core.mapper.BaseMapperPlus;
import com.xmtlxx.wms.domain.Supervise;
import com.xmtlxx.wms.domain.bo.SuperviseBo;
import com.xmtlxx.wms.domain.vo.SuperviseVo;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 监督反馈Mapper接口
 *
 * @author xmtlxx
 * @date 2023-04-04
 */
public interface SuperviseMapper extends BaseMapperPlus<SuperviseMapper, Supervise, SuperviseVo> {
    /**
     * 根据条件分页查询监督反馈
     *
     * @param supervise 监督反馈
     * @return Page Supervise
     */
    @DataPermission({
        @DataColumn(key = "tenantName", value = "s.create_by"),
//        @DataColumn(key = "deptName", value = "s.dept_id"),
        @DataColumn(key = "userName", value = "s.create_by")
    })
    Page<SuperviseVo> selectPageSuperviseList(@Param("page") Page<Supervise> page, @Param("supervise") SuperviseBo supervise);

    /**
     * 查询监督反馈列表
     *
     * @param supervise 监督反馈
     * @return 监督反馈集合
     */
    @DataPermission({
        @DataColumn(key = "tenantName", value = "s.create_by"),
//        @DataColumn(key = "deptName", value = "s.dept_id"),
        @DataColumn(key = "userName", value = "s.create_by")
    })
    List<SuperviseVo> selectSuperviseList(@Param("supervise") SuperviseBo supervise);

    SuperviseVo selectSuperviseVoByID(String id);
}
